home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 52
/
Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso
/
Aminet
/
dev
/
gg
/
ncurses-5.3.lha
/
ncurses-5.3
/
sysdeps
/
unix
/
sysv
/
linux
/
edit_man.sh
< prev
next >
Wrap
Linux/UNIX/POSIX Shell Script
|
2002-10-24
|
790b
|
38 lines
#!/bin/sh
# this script is generated by the configure-script
prefix=$1
shift
mandir=$1
shift
edit_man_sed=$1
shift
datadir="${prefix}/share"
MKDIRS="mkinstalldirs"
INSTALL="/usr/bin/install -c"
INSTALL_DATA="${INSTALL} -m 644"
TMP=${TMPDIR-/tmp}/man$$
trap "rm -f $TMP" 0 1 2 5 15
for i in $*
do
case $i in
*.[0-9]*)
section=`expr "$i" : '.*\.\([0-9]\)[xm]*'`;
if [ ! -d $mandir/man${section} ]; then
$MKDIRS $mandir/man$section
fi
source=`basename $i`
target=`grep "^$source" man/man_db.renames | awk '{print $2}'`
if test -z "$target" ; then
echo '? missing rename for '$source
target="$source"
fi
target="$mandir/man$section/$target"
sed -e 's,@DATADIR@,$datadir,' < $i | sed -f ${edit_man_sed} >$TMP
echo installing $target
$INSTALL_DATA $TMP $target
;;
esac
done